package org.tnc.hr.service.impl;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.tnc.hr.dao.WorkDaysDao;
import org.tnc.hr.model.WorkDays;
import org.tnc.hr.service.WorkDaysManager;

public class WorkDaysManagerImpl implements WorkDaysManager {

    private WorkDaysDao workDaysDao;

    public void setWorkDaysDao(WorkDaysDao workDaysDao) {
        this.workDaysDao = workDaysDao;
    }
 
    public void saveWorkDays(WorkDays wd){
        workDaysDao.save(wd);
    }
    
    public void saveWorkDaysByList(ArrayList<WorkDays> list){
        for (int i = 0; i < list.size(); i++) {
            this.workDaysDao.save(list.get(i));
        }
    }
    
    public List<WorkDays> getWorkDaysByMonth(Date startDate, Date endDate){
        return workDaysDao.getWorkDaysByMonth(startDate, endDate);
        
    }
    
}
